import { Component, OnInit } from '@angular/core';
import { flyInOut } from "../../utils/anim";
import { ArticleDetail } from './shared/article-detail.model';
import { ArticleDetailService } from './shared/article-detail.service';

@Component({
	selector: 'article-detail',
	templateUrl: 'article-detail.component.html',
	providers: [ArticleDetailService],
	animations: [
		flyInOut
	]
})

export class ArticleDetailComponent implements OnInit {
	articleDetail: ArticleDetail[] = [];

	constructor(private articleDetailService: ArticleDetailService) { }

	ngOnInit() {
		this.articleDetailService.getList().subscribe((res) => {
			this.articleDetail = res;
		});
	}
}